home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_400 / 410_01 / wlist / node.cc < prev    next >
Encoding:
C/C++ Source or Header  |  1995-12-30  |  2.1 KB  |  69 lines

  1. static char sccs_id[] = "@(#)node.cc    1.1 2/15/94 10:38:12";
  2. /*+++
  3.  
  4.   :  :    node.cc
  5.  
  6.     PURPOSE : node class member functions
  7.  
  8.     DATE    : Sat Jan 29 11:49:28 EST 1994
  9.  
  10.     AUTHOR  : W. Hatch
  11.  
  12.     PROJECT : WEH Software
  13.             
  14.     COMPANY : Coleman Research Corporation
  15.           9891 Broken Land Parkway
  16.           Suite 200
  17.           Columbia, Maryland 21045
  18.           Phone (301)621-8600
  19.           FAX (410)7210
  20. ---*/ 
  21. /*
  22. ------------------------------------------------------------------------
  23.   MODIFICATIONS
  24. DATE    PROGRAMMER    DESCRIPTION
  25. ========================================================================
  26.  
  27. */
  28.  
  29. #include <stdio.h>
  30. #include <wlist.h>
  31.  
  32. //----------------------------------------------------------------------
  33. // constructor
  34. //----------------------------------------------------------------------
  35. node::node(){
  36.     previous=(node *)0;
  37.     next=(node *)0;
  38.     data=(void *)0;
  39. }
  40.  
  41. //----------------------------------------------------------------------
  42. // destructor
  43. //----------------------------------------------------------------------
  44. node::~node(){}
  45.  
  46. //----------------------------------------------------------------------
  47. // access and assign previous
  48. //----------------------------------------------------------------------
  49. node *node::PreviousNode(){return previous;}
  50. node *node::PreviousNode(node *v){previous=v; return previous;}
  51.  
  52. //----------------------------------------------------------------------
  53. // access and assign next
  54. //----------------------------------------------------------------------
  55. node *node::NextNode(){return next;}
  56. node *node::NextNode(node *v){next=v; return next;}
  57.  
  58. //----------------------------------------------------------------------
  59. // access and assign data
  60. //----------------------------------------------------------------------
  61. void *node::NodeData(){return data;}
  62. void *node::NodeData(void *v){data = v; return data;}
  63. //----------------------------------------------------------------------
  64. // print (used mostly for debug)
  65. //----------------------------------------------------------------------
  66. void node::print(FILE *pf){
  67.     fprintf(pf,"\t\tprevious %x, next %x\n",PreviousNode(),NextNode());
  68. }
  69.